﻿<form id="form1" method="post">
    @Html.AntiForgeryToken()
    <br /><br />
    <div style="text-align:center;">
        接收人：<input type="text" id="user" name="user" class="mymember" style="width:250px;" />
    </div><br />
    <div style="text-align:center;">
        <input type="button" class="mybutton" onclick="checkform(this);" value="&nbsp;确&nbsp;定&nbsp;" />
        <input type="button" class="mybutton" value="&nbsp;取&nbsp;消&nbsp;" onclick="new RoadUI.Window().close();" />
    </div>
</form>
<script type="text/javascript">
    $(function () {

    });
    function checkform(but)
    {
        var user = $("#user").val();
        if (user.length == 0)
        {
            alert("请选择抄送接收人!");
            return;
        }
        var f = document.forms[0];
        $(but).prop("disabled", true);
        $.ajax({
            url: "FlowCopyForSave", data: {
                "taskid": "@ViewData["taskId"]", "user": user,
                "__RequestVerificationToken": $("input[name='__RequestVerificationToken']").val()
            }, type: "post", success: function (text)
            {
                alert(text);
                $(but).prop("disabled", false);
                new RoadUI.Window().close();
            }
        });
    }
</script>